package com.md.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class WebConfig extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[0]; //加载spring配置
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{SpringMvcConfig.class}; //加载springmvc配置
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"}; //设置网站要接管的目录
    }
}
